package com.jy.wms.web;

import com.jy.wms.pojo.User;
import net.sf.json.JSONObject;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/sysuser")
public class SysUserController {
    @RequestMapping(value = "/user")
    public String toUser(){
        return "user/user";
    }
    @RequestMapping(value = "/addUser")
    public String addUser(){
        return "user/addUser";
    }
    @RequestMapping(value = "/userform")
    public @ResponseBody  String userform(@RequestBody User user){
        JSONObject jsonObject=JSONObject.fromObject(user);
        System.out.println(jsonObject.toString());
        return jsonObject.toString();
    }

}
